package com.fr.web.core;

import com.fr.report.CellElement;
import com.fr.report.ReportGetter;

public class CellBackgroundDimension extends BackgroundDimension
{
  private CellElement ce;
  private ReportGetter reportCase;

  public CellBackgroundDimension(CellElement paramCellElement, ReportGetter paramReportGetter)
  {
    this.ce = paramCellElement;
    this.reportCase = paramReportGetter;
  }

  public int getHeight()
  {
    int i = 0;
    int j = this.ce.getRow();
    int k = 0;
    int l = this.ce.getRowSpan();
    while (k < l)
    {
      i += this.reportCase.getRowHeight(j + k);
      ++k;
    }
    return i;
  }

  public int getWidth()
  {
    int i = 0;
    int j = this.ce.getColumn();
    int k = 0;
    int l = this.ce.getColumnSpan();
    while (k < l)
    {
      i += this.reportCase.getColumnWidth(j + k);
      ++k;
    }
    return i;
  }
}